{\rtf1\ansi\ansicpg936\cocoartf1671\cocoasubrtf200
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Menlo-Regular;\f2\fnil\fcharset134 PingFangSC-Regular;
}
{\colortbl;\red255\green255\blue255;\red255\green255\blue255;\red170\green13\blue145;\red0\green0\blue0;
\red92\green38\blue153;\red63\green110\blue116;\red46\green13\blue110;\red196\green26\blue22;\red28\green0\blue207;
\red100\green56\blue32;\red38\green71\blue75;}
{\*\expandedcolortbl;;\csgenericrgb\c100000\c100000\c100000;\csgenericrgb\c66500\c5200\c56900;\csgenericrgb\c0\c0\c0;
\csgenericrgb\c35900\c14900\c60100;\csgenericrgb\c24700\c43100\c45600;\csgenericrgb\c18100\c5200\c43100;\csgenericrgb\c77000\c10200\c8600;\csgenericrgb\c11000\c0\c81000;
\csgenericrgb\c39100\c22000\c12500;\csgenericrgb\c14900\c27800\c29400;}
\paperw12240\paperh15840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0

\f0\fs24 \cf0 \cb2 \
\pard\tx626\pardeftab626\pardirnatural\partightenfactor0

\f1\fs26 \cf3 @property\cf4  (\cf3 nonatomic\cf4 , \cf3 strong\cf4 ) \cf5 NSArray\cf4  *datas;
\f0\fs24 \cf0 \

\f1\fs26 \cf3 @property\cf4  (\cf3 nonatomic\cf4 , \cf3 strong\cf4 ) \cf5 NSMutableDictionary\cf4  *param;
\f0\fs24 \cf0 \

\f1\fs26 \cf3 @property\cf4 (\cf3 nonatomic\cf4 , \cf3 assign\cf4 ) \cf5 NSInteger\cf4  page;
\f0\fs24 \cf0 \

\f1\fs26 \cf3 @property\cf4  (\cf3 nonatomic\cf4 , \cf3 strong\cf4 ) \cf5 UIView\cf4  *emptyView;\
\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0

\f0\fs24 \cf0 \
\
\pard\tx626\pardeftab626\pardirnatural\partightenfactor0

\f1\fs26 \cf4 - (\cf5 NSArray\cf4  *)datas
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 if\cf4  (!\cf6 _datas\cf4 ) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf6 _datas\cf4  = [\cf5 NSArray\cf4  \cf7 array\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \}
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 return\cf4  \cf6 _datas\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \}
\f0\fs24 \cf0 \
\

\f1\fs26 \cf4 - (\cf5 NSMutableDictionary\cf4  *)param
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 if\cf4  (!\cf6 _param\cf4 ) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf6 _param\cf4  = [\cf5 NSMutableDictionary\cf4  \cf7 dictionary\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf6 _param\cf4 [\cf8 @"pagesize"\cf4 ] = \cf9 @(10)\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \}
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 return\cf4  \cf6 _param\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \}\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0

\f0\fs24 \cf0 \
\
\pard\tx626\pardeftab626\pardirnatural\partightenfactor0

\f1\fs26 \cf4 - (\cf3 void\cf4 )viewDidLoad \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4     [\cf3 super\cf4  \cf7 viewDidLoad\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 self\cf4 .\cf5 tableView\cf4 .\cf5 mj_header\cf4  = [\cf5 MJRefreshNormalHeader\cf4  \cf7 headerWithRefreshingTarget\cf4 :\cf3 self\cf4  \cf7 refreshingAction\cf4 :\cf3 @selector\cf4 (loadData)];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 self\cf4 .\cf5 tableView\cf4 .\cf5 mj_footer\cf4  = [\cf5 MJRefreshBackNormalFooter\cf4  \cf7 footerWithRefreshingTarget\cf4 :\cf3 self\cf4  \cf7 refreshingAction\cf4 :\cf3 @selector\cf4 (loadMoreData)];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     [\cf3 self\cf4 .\cf5 tableView\cf4 .\cf5 mj_header\cf4  \cf7 beginRefreshing\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \}\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0

\f0\fs24 \cf0 \
\
\pard\tx626\pardeftab626\pardirnatural\partightenfactor0

\f1\fs26 \cf4 - (\cf5 UIView\cf4  *)emptyView
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 if\cf4  (!\cf6 _emptyView\cf4 ) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf6 _emptyView\cf4  = [[\cf5 UIView\cf4  \cf7 alloc\cf4 ] \cf7 initWithFrame\cf4 :\cf7 CGRectMake\cf4 (\cf9 0\cf4 , \cf9 0\cf4 , \cf10 fkScreenW\cf4 , \cf9 200\cf4 )];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf5 UIImageView\cf4  *imageView = [[\cf5 UIImageView\cf4  \cf7 alloc\cf4 ] \cf7 initWithImage\cf4 :[\cf5 UIImage\cf4  \cf7 imageNamed\cf4 :\cf8 @"my_consulting_icon_no"\cf4 ]];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf6 _emptyView\cf4  \cf7 addSubview\cf4 :imageView];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [imageView \cf7 mas_makeConstraints\cf4 :^(\cf5 MASConstraintMaker\cf4  *make) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4             make.\cf5 center\cf4 .\cf7 offset\cf4 (\cf9 0\cf4 );
\f0\fs24 \cf0 \

\f1\fs26 \cf4             make.\cf5 width\cf4 .\cf10 mas_equalTo\cf4 (fk_adjustW(imageView.image.size.width));
\f0\fs24 \cf0 \

\f1\fs26 \cf4             make.\cf5 height\cf4 .\cf10 mas_equalTo\cf4 (fk_adjustW(imageView.image.size.height));
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \}];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf5 UILabel\cf4  *label = [[\cf5 UILabel\cf4  \cf7 alloc\cf4 ] \cf7 init\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf6 _emptyView\cf4  \cf7 addSubview\cf4 :label];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         label.\cf5 font\cf4  = \cf11 fk_adjustFont\cf4 (\cf9 16\cf4 );
\f0\fs24 \cf0 \

\f1\fs26 \cf4         label.\cf5 text\cf4  = \cf8 @"
\f2 \'bb\'b9\'c3\'bb\'d3\'d0\'b6\'a9\'b5\'a5\'a3\'ac\'bf\'ec\'c8\'a5\'b9\'e4\'b9\'e4\'b0\'c9
\f1 !"\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4         label.\cf5 textColor\cf4  = \cf10 fkColor999999\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [label \cf7 mas_makeConstraints\cf4 :^(\cf5 MASConstraintMaker\cf4  *make) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4             make.\cf5 top\cf4 .\cf7 equalTo\cf4 (imageView.\cf5 mas_bottom\cf4 ).\cf7 offset\cf4 (\cf9 20\cf4 );
\f0\fs24 \cf0 \

\f1\fs26 \cf4             make.\cf5 centerX\cf4 .\cf7 offset\cf4 (\cf9 0\cf4 );
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \}];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \}
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 return\cf4  \cf6 _emptyView\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \}\cf10 \
\
\
\
#pragma mark - 
\f2 \'cd\'f8\'c2\'e7\'c7\'eb\'c7\'f3
\f0\fs24 \cf0 \

\f1\fs26 \cf4 - (\cf3 void\cf4 )loadData
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 self\cf4 .page = \cf9 1\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 self\cf4 .param[\cf8 @"page"\cf4 ] = \cf9 @(\cf3 self\cf4 .page\cf9 )\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4     [FKHttpTool postWithSuffix:\cf8 @"m=App&c=Order&a=myorder"\cf4  param:\cf3 self\cf4 .param success:^(FKBaseResult *result) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf3 self\cf4 .tableView.mj_header endRefreshing];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf3 if\cf4  (result.isSuccess) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4             \cf3 self\cf4 .datas = result.data[\cf8 @"list"\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4             [\cf3 self\cf4 .tableView reloadData];
\f0\fs24 \cf0 \

\f1\fs26 \cf4             \cf3 if\cf4  (\cf3 self\cf4 .datas.count > \cf9 0\cf4 ) \cf3 self\cf4 .page++;
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \}
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf3 self\cf4 .tableView fk_tableViewCheckEmptyDataWithDataCount:\cf3 self\cf4 .datas.count emptyView:\cf3 self\cf4 .emptyView];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \} failure:^(NSError *error) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf3 self\cf4 .tableView.mj_header endRefreshing];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf3 self\cf4 .tableView fk_tableViewCheckEmptyDataWithDataCount:\cf3 self\cf4 .datas.count emptyView:\cf3 self\cf4 .emptyView];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \}];
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \}
\f0\fs24 \cf0 \
\

\f1\fs26 \cf4 - (\cf3 void\cf4 )loadMoreData
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \cf3 self\cf4 .param[\cf8 @"page"\cf4 ] = \cf9 @(\cf3 self\cf4 .page\cf9 )\cf4 ;
\f0\fs24 \cf0 \

\f1\fs26 \cf4     [FKHttpTool postWithSuffix:\cf8 @"m=App&c=Order&a=myorder"\cf4  param:\cf3 self\cf4 .param success:^(FKBaseResult *result) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf3 self\cf4 .tableView.mj_footer endRefreshing];
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \cf3 if\cf4  (result.isSuccess) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4             NSArray *newArray = result.data[\cf8 @"list"\cf4 ];
\f0\fs24 \cf0 \

\f1\fs26 \cf4             \cf3 if\cf4  (newArray.count > \cf9 0\cf4 ) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4                 NSMutableArray *array = [NSMutableArray arrayWithArray:\cf3 self\cf4 .datas];
\f0\fs24 \cf0 \

\f1\fs26 \cf4                 [array addObjectsFromArray:newArray];
\f0\fs24 \cf0 \

\f1\fs26 \cf4                 \cf3 self\cf4 .datas = array;
\f0\fs24 \cf0 \

\f1\fs26 \cf4                 [\cf3 self\cf4 .tableView reloadData];
\f0\fs24 \cf0 \

\f1\fs26 \cf4                 \cf3 self\cf4 .page++;
\f0\fs24 \cf0 \

\f1\fs26 \cf4             \} \cf3 else\cf4  \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4                 [\cf3 self\cf4 .tableView.mj_footer endRefreshingWithNoMoreData];
\f0\fs24 \cf0 \

\f1\fs26 \cf4             \}
\f0\fs24 \cf0 \

\f1\fs26 \cf4         \}
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \} failure:^(NSError *error) \{
\f0\fs24 \cf0 \

\f1\fs26 \cf4         [\cf3 self\cf4 .tableView.mj_footer endRefreshing];
\f0\fs24 \cf0 \

\f1\fs26 \cf4     \}];
\f0\fs24 \cf0 \

\f1\fs26 \cf4 \}\
\
\
\
}